/*
 * Copyright (c) 2010 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.api.data.contacts.v3.model;

import com.google.api.client.util.Key;

/**
 * Specifies the preferred languages of the contact. The element can be
 * repeated. The language must be specified using one of two mutually exclusive
 * methods: using the freeform {@link #label} attribute, or using the {@link #code} attribute,
 * whose value must conform to the <a href="ftp://ftp.isi.edu/in-notes/bcp/bcp47.txt">IETF BCP 47 specification</a>.
 * 
 * @author Nicolas Garnier
 */
public class Language {

  /**
   * A language code conforming to the IETF BCP 47 specification. The server
   * returns an error if a nonconformant value is provided.
   */
  @Key("@code")
  public String code;

  /** A freeform name of a language. Must not be empty or all whitespace. */
  @Key("@label")
  public String label;
}
